﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfSystemMessList.aspx.cs" Inherits="msBsc.WebUi.mMall.Buyer.mfSystemMessList" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>手机地接客商城</title>
    <%=getMeta()%>
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/css/home/base.css" charset="gbk" />
    <link href="/themes/mStyle1/css/public/mChatMessageList.css" rel="stylesheet" charset="gbk" />
    <%=getBodyBeforeJs()%>
    <style type="text/css">
        .Unread {
            color: #f00;
            height: 30px;
            line-height: 30px;
            margin-right: 5px;
            text-align: center;
            width: 30px;
        }

        .Read {
            color: #999;
            height: 30px;
            line-height: 30px;
            margin-right: 5px;
            text-align: center;
            width: 30px;
        }

        .ulr_message {
            display: table-cell;
            width: 35px;
            vertical-align: middle;
        }

        .pager {
            display: block;
            height: 50px;
            margin-bottom: 20px;
        }

            .pager a {
                background-color: #fff;
                border: 1px solid #bfc2c3;
                color: #3c3c3c;
                display: block;
                height: 50px;
                line-height: 50px;
                outline: medium none;
                position: absolute;
                text-align: center;
                text-decoration: none;
                width: 100%;
            }
    </style>
</head>
<body>
    <div class="viewport" style="background: #edeeee;">
        <%=msBsc.WebUi.Code.QtHtmlGet.GetWapHeaderMenuHtml(true) %>
        <form action='#' method="post" id="J_EmailForm">
            <input type="hidden" id="pageIndex" value="" />
            <ul class="m_chat" id="chat_list">
            </ul>
            <div>
                <div class="pager" style="display: none">
                    <a href="###" id="pageNextText">查询更多</a>
                </div>
            </div>
            <xmp id="svc_list_temp_message" style="display: none">
                {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
             <li>
                    <div class="ulc_message">
                        <a class="ulc_messageInfo" href="/mb_SystemMess.htm?msgId={{d.rows[i].MESSAGE_ID}}">{{d.rows[i].MESSAGE_TITLE}}</a>
                    </div>
                  <div class="ulr_message">
                      {{#if(d.rows[i].ISREAD==0){ }}
                      <a class="Unread" href="#">未读</a>
                      {{#} }}
                      {{#if(d.rows[i].ISREAD==1){ }}
                      <a class="Read" href="#">已读
                      </a>
                      {{#} }}</div>
                </li>
                {{#} }}
                 </xmp>
        </form>

    </div>
    <!--start JS引用-->
    <script type="text/javascript" src="/jqPlugin/js/jquery-1.8.3.min.js" charset="gbk"></script>
    <script type="text/javascript" src="/jqPlugin/js/jBase.js" charset="gbk"></script>
    <script type="text/javascript" src="/jqPlugin/js/jBPage.js" charset="gbk"></script>
    <script type="text/javascript" src="/themes/Style1/jsQt.js" charset="gbk"></script>
    <script type="text/javascript" src="/jqPlugin/js/laytpl.js" charset="gbk"></script>
    <script type="text/javascript" src="/themes/wStyle1/js/comm/VerifyJs.js" charset="gbk"></script>
    <script type="text/javascript" src="/themes/wStyle1/js/comm/DateInfo.js" charset="gbk"></script>
    <!--end JS引用-->
    <script type="text/javascript">
        (function () {
            $("#h_title").text("系统消息列表");
            $("#pageIndex").val(1);
            $.getMessageCount();
            //$.getMessageCount();
            //点击更多
            $("#pageNextText").live("click", function () {
                nextPage();
            });
        })();
        function btnDo(pIndex) {
            var opart = new jsonRow();
            opart.AddCell("ACTION", "init");
            opart.AddCell("pageRows", 10);
            opart.AddCell("pageNum", pIndex);
            ajaxComm(opart);
        }
        btnDo(1);
        function showMessageList(data) {
            var _html = $('#svc_list_temp_message').html();
            laytpl(_html).render(data, function (render) {
                $('#chat_list').html(render);
            });
            showNextPage(data.rows[0].DATACOUNT);
        }

        //是否显示更多
        function showNextPage(dataCount) {
            var pIndex = $("#pageIndex").val();
            if (IsNull(pIndex)) {
                pIndex = 1;
            }
            var pageIndex = parseInt(pIndex);
            var count = parseInt(dataCount);
            if (pageIndex * 10 < count) {
                $(".pager").show();
            } else {
                $(".pager").hide();
            }
        }

        //更多
        function nextPage() {
            var pIndex = $("#pageIndex").val();
            if (IsNull(pIndex) || isNaN(pIndex)) {
                pIndex = 1;
            }
            var pageIndex = parseInt(pIndex) + 1;
            $("#pageIndex").val(pageIndex);
            btnDo(pageIndex);
        }
    </script>
</body>
<%=getBodyAfterJs() %>
</html>
